home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / PowerPlant / 3D Additions 1.7 / 3D Additions / 3DAttachments.h < prev    next >
Encoding:
Text File  |  1995-09-19  |  7.3 KB  |  227 lines  |  [TEXT/CWIE]

  1. // ============================================================================
  2. //    3DAttachments.h       ©1995 J. Rodden, DD/MF & Associates. All rights reserved
  3. // ============================================================================
  4. //    A few Attachment classes to provide a 3D interface.
  5. //    There are attachements that allow programatic customization of color usage
  6. //    and others that use the settings defined by the 3DUtilities package.
  7. //
  8. // This source code is loosely based on and heavily inspired by source code
  9. // by James W. Osborne, copyright (c) 1993, Apple Computer.
  10.  
  11. #pragma once
  12.  
  13. #include <3DGrays.h>
  14.  
  15. #include <LAttachment.h>
  16. #include <LPane.h>
  17.  
  18. // ============================================================================
  19. // ============================================================================
  20. // • C3DBkgdAttachment                                         C3DBkgdAttachment •
  21. // ============================================================================
  22.  
  23. class    C3DBkgdAttachment : public LAttachment {
  24. public:
  25.             C3DBkgdAttachment(Boolean inExecuteHost = true);
  26.  
  27. protected:
  28.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  29. };
  30.  
  31.  
  32. // ============================================================================
  33. // ============================================================================
  34. // • C3DEdgeAttachment                                         C3DEdgeAttachment •
  35. // ============================================================================
  36.  
  37. class    C3DEdgeAttachment : public LAttachment {
  38. public:
  39.             C3DEdgeAttachment(PenState *inPenState, SBooleanRect& inEdges,
  40.                                 const RGBColor &inULColor = kWhite,
  41.                                 const RGBColor &inLRColor = kShadowGray,
  42.                                 Boolean inExecuteHost = true);
  43.  
  44. protected:
  45.     PenState        mPenState;
  46.     SBooleanRect    mEdges;
  47.     RGBColor        mULColor;
  48.     RGBColor        mLRColor;
  49.  
  50.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  51. };
  52.  
  53.  
  54. // ============================================================================
  55. // • C3DInsetEdgeAttachment                                C3DInsetEdgeAttachment •
  56. // ============================================================================
  57.  
  58. class    C3DInsetEdgeAttachment : public LAttachment {
  59. public:
  60.             C3DInsetEdgeAttachment( SBooleanRect& inEdges, Boolean inExecuteHost = true);
  61.  
  62. protected:
  63.     SBooleanRect    mEdges;
  64.  
  65.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  66. };
  67.  
  68.  
  69. // ============================================================================
  70. // • C3DRaisedEdgeAttachment                           C3DRaisedEdgeAttachment •
  71. // ============================================================================
  72.  
  73. class    C3DRaisedEdgeAttachment : public LAttachment {
  74. public:
  75.             C3DRaisedEdgeAttachment( SBooleanRect& inEdges, Boolean inExecuteHost = true);
  76.  
  77. protected:
  78.     SBooleanRect    mEdges;
  79.  
  80.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  81. };
  82.  
  83.  
  84. // ============================================================================
  85. // ============================================================================
  86. // • C3DFrameAttachment                                        C3DFrameAttachment •
  87. // ============================================================================
  88.  
  89. class    C3DFrameAttachment : public LAttachment {
  90. public:
  91.             C3DFrameAttachment(PenState *inPenState,
  92.                                 const RGBColor &inULColor = kWhite,
  93.                                 const RGBColor &inLRColor = kShadowGray,
  94.                                 Boolean inExecuteHost = true);
  95.  
  96. protected:
  97.     PenState        mPenState;
  98.     RGBColor        mULColor;
  99.     RGBColor        mLRColor;
  100.  
  101.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  102. };
  103.  
  104.  
  105. // ============================================================================
  106. // • C3DInsetFrameAttachment                           C3DInsetFrameAttachment •
  107. // ============================================================================
  108.  
  109. class    C3DInsetFrameAttachment : public LAttachment {
  110. public:
  111.             C3DInsetFrameAttachment(Boolean inExecuteHost = true);
  112.  
  113. protected:
  114.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  115. };
  116.  
  117.  
  118. // ============================================================================
  119. // • C3DRaisedFrameAttachment                          C3DRaisedFrameAttachment •
  120. // ============================================================================
  121.  
  122. class    C3DRaisedFrameAttachment : public LAttachment {
  123. public:
  124.             C3DRaisedFrameAttachment(Boolean inExecuteHost = true);
  125.  
  126. protected:
  127.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  128. };
  129.  
  130.  
  131. // ============================================================================
  132. // ============================================================================
  133. // • C3DBorderAttachment                                   C3DBorderAttachment •
  134. // ============================================================================
  135.  
  136. class    C3DBorderAttachment : public LAttachment {
  137. public:
  138.             C3DBorderAttachment(PenState *inPenState,
  139.                                 const RGBColor &inULColor = kWhite,
  140.                                 const RGBColor &inLRColor = kShadowGray,
  141.                                 Boolean inExecuteHost = true);
  142.  
  143. protected:
  144.     PenState        mPenState;
  145.     RGBColor        mULColor;
  146.     RGBColor        mLRColor;
  147.  
  148.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  149. };
  150.  
  151.  
  152. // ============================================================================
  153. // • C3DInsetBorderAttachment                          C3DInsetBorderAttachment •
  154. // ============================================================================
  155.  
  156. class    C3DInsetBorderAttachment : public LAttachment {
  157. public:
  158.             C3DInsetBorderAttachment(Boolean inExecuteHost = true);
  159.  
  160. protected:
  161.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  162. };
  163.  
  164.  
  165. // ============================================================================
  166. // • C3DRaisedBorderAttachment                         C3DRaisedBorderAttachment •
  167. // ============================================================================
  168.  
  169. class    C3DRaisedBorderAttachment : public LAttachment {
  170. public:
  171.             C3DRaisedBorderAttachment(Boolean inExecuteHost = true);
  172.  
  173. protected:
  174.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  175. };
  176.  
  177.  
  178. // ============================================================================
  179. // ============================================================================
  180. // • C3DPanelAttachment                                         C3DPanelAttachment •
  181. // ============================================================================
  182.  
  183. class    C3DPanelAttachment : public LAttachment {
  184. public:
  185.             C3DPanelAttachment(PenState *inPenState,
  186.                                 const RGBColor &inBKColor = kBackgroundGray,
  187.                                 const RGBColor &inULColor = kWhite,
  188.                                 const RGBColor &inLRColor = kShadowGray,
  189.                                 Boolean inFrameIt = false,
  190.                                 Boolean inExecuteHost = true);
  191.  
  192. protected:
  193.     PenState    mPenState;
  194.     RGBColor    mBKColor;
  195.     RGBColor    mULColor;
  196.     RGBColor    mLRColor;
  197.     Boolean        mFrameIt;
  198.  
  199.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  200. };
  201.  
  202.  
  203. // ============================================================================
  204. // • C3DInsetPanelAttachment                            C3DInsetPanelAttachment •
  205. // ============================================================================
  206.  
  207. class    C3DInsetPanelAttachment : public LAttachment {
  208. public:
  209.             C3DInsetPanelAttachment(Boolean inExecuteHost = true);
  210.  
  211. protected:
  212.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  213. };
  214.  
  215.  
  216. // ============================================================================
  217. // • C3DRaisedPanelAttachment                           C3DRaisedPanelAttachment •
  218. // ============================================================================
  219.  
  220. class    C3DRaisedPanelAttachment : public LAttachment {
  221. public:
  222.             C3DRaisedPanelAttachment(Boolean inExecuteHost = true);
  223.  
  224. protected:
  225.     virtual void    ExecuteSelf(MessageT inMessage, void *ioParam);
  226. };
  227.